//
// Created by Jinyu Zhu on 2022/4/20.
//

#ifndef PROVDB_TAG_GRAPH_ALGORITHM_GRAPHD_H
#define PROVDB_TAG_GRAPH_ALGORITHM_GRAPHD_H

// pre-definitions
#include "iostream"
#include "graphd.h"
#include "set"

class AlgorithmDirectedGraph {
public:
    static void LoadOneTsv(const PDirectedGraph& PG, const std::string& TsvPath);

    // On Client: Backtracking + FrontTracking
    static PDirectedGraph TrackGraphN(const PDirectedGraph& PG, const std::vector<int>& StartIdV,
                                     const int& BackStep, const int& FrontStep, const int& MaxNext,
                                     std::set<int>& NewNodeIdSet, std::set<int>& NewEdgeIdSet);

    static PDirectedGraph TrackGraph(const PDirectedGraph& PG, const std::vector<int>& StartIdV,
                                     const int& BackStep, const int& FrontStep, const int& MaxNext) {
        std::set<int> NewNodeIdSet, NewEdgeIdSet;
        return TrackGraphN(PG, StartIdV, BackStep, FrontStep, MaxNext, NewNodeIdSet, NewEdgeIdSet);
    }
};


#endif //PROVDB_TAG_GRAPH_ALGORITHM_GRAPHD_H
